import { IUserInfo } from "./user";

export interface IPojectItem {
  id: string;
  projectId: string;
  projectName: string;
}

export interface IProject {
  id: string;
  projectId: string;
  img: string;//图片
  title: string;//标题
  date: string;//日期
  isUp: boolean;//是否上升
  level: string;
  task: {
    all: number;
    current: number;
    executor: Array<string>
  }
}

export interface IAddTask {
  name: string;
  group: string;
  level: string;
  createTime: string;
  endTime: string;
  user: {
    id: string,
    name: string,
  }
  desc: string;
}

// 待完成 完成中 已完成
export enum IStatus {
  beforeComplete = "待完成",
  completing = "完成中",
  aftercomplete = "已完成"
}
export interface ITask {
  id?: string;
  name: string;
  group?: string;//分组
  estimatedTime?: string;//预估时间
  actualTime?: string;//实际时间
  createTime: string;
  endTime: string;
  executor: IUserInfo;
  desc?: string;
  isUp: boolean;//是否上升
  level: number;
  status: IStatus;//完成状态
  schedule: string;//进度
}


export interface IProjectLog {
  id: string;
  user: IUserInfo;
  logs: ILog[];
}

interface ILog {
  icon: string;
  name: string;
}